home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 65.zip / BS1 part 65 / DevPac v3.02b.adf / include / exec / io.i < prev    next >
Text File  |  1991-11-20  |  3KB  |  122 lines

  1.     IFND    EXEC_IO_I
  2. EXEC_IO_I    SET    1
  3. **
  4. **    $Filename: exec/io.i $
  5. **    $Release: 1.3 $
  6. **
  7. **    
  8. **
  9. **    (C) Copyright 1985,1986,1987,1988 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13.     IFND EXEC_PORTS_I
  14.     INCLUDE "exec/ports.i"
  15.     ENDC    ; EXEC_PORTS_I
  16.  
  17.     IFND EXEC_LIBRARIES_I
  18.     INCLUDE "exec/libraries.i"
  19.     ENDC    ; EXEC_LIBRARIES_I
  20.  
  21.  
  22. *----------------------------------------------------------------
  23. *
  24. *   IO Request Structures
  25. *
  26. *----------------------------------------------------------------
  27.  
  28. *------ Required portion of IO request:
  29.  
  30.  STRUCTURE  IO,MN_SIZE
  31.     APTR    IO_DEVICE            * device node pointer
  32.     APTR    IO_UNIT            * unit (driver private)
  33.     UWORD   IO_COMMAND            * device command
  34.     UBYTE   IO_FLAGS            * special flags
  35.     BYTE    IO_ERROR            * error or warning code
  36.     LABEL   IO_SIZE
  37.  
  38.  
  39. *------ Standard IO request extension:
  40.  
  41.     ULONG   IO_ACTUAL            * actual # of bytes transfered
  42.     ULONG   IO_LENGTH            * requested # of bytes transfered
  43.     APTR    IO_DATA            * pointer to data area
  44.     ULONG   IO_OFFSET            * offset for seeking devices
  45.     LABEL   IOSTD_SIZE
  46.  
  47.  
  48. *------ IO_FLAGS bit definitions:
  49.  
  50.     BITDEF  IO,QUICK,0            * complete IO quickly
  51.  
  52.  
  53. *----------------------------------------------------------------
  54. *
  55. *   Standard Device Library Functions
  56. *
  57. *----------------------------------------------------------------
  58.  
  59.         LIBINIT
  60.  
  61.         LIBDEF  DEV_BEGINIO        * process IO request
  62.         LIBDEF  DEV_ABORTIO        * abort IO request
  63.  
  64.  
  65. *----------------------------------------------------------------
  66. *
  67. *   IO Function Macros
  68. *
  69. *----------------------------------------------------------------
  70.  
  71. BEGINIO        MACRO
  72.         LINKLIB DEV_BEGINIO,IO_DEVICE(A1)
  73.         ENDM
  74.  
  75. ABORTIO        MACRO
  76.         LINKLIB DEV_ABORTIO,IO_DEVICE(A1)
  77.         ENDM
  78.  
  79.  
  80. *----------------------------------------------------------------
  81. *
  82. *   Standard Device Command Definitions
  83. *
  84. *----------------------------------------------------------------
  85.  
  86. *------ Command definition macro:
  87. DEVINIT        MACRO   * [baseOffset]
  88.         IFC        '\1',''
  89. CMD_COUNT   SET        CMD_NONSTD
  90.         ENDC
  91.         IFNC    '\1',''
  92. CMD_COUNT   SET        \1
  93.         ENDC
  94.         ENDM
  95.  
  96. DEVCMD        MACRO   * cmdname
  97. \1        EQU        CMD_COUNT
  98. CMD_COUNT   SET        CMD_COUNT+1
  99.         ENDM
  100.  
  101.  
  102. *------ Standard device commands:
  103.  
  104.         DEVINIT 0
  105.  
  106.         DEVCMD  CMD_INVALID        * invalid command
  107.         DEVCMD  CMD_RESET        * reset as if just inited
  108.         DEVCMD  CMD_READ        * standard read
  109.         DEVCMD  CMD_WRITE        * standard write
  110.         DEVCMD  CMD_UPDATE        * write out all buffers
  111.         DEVCMD  CMD_CLEAR        * clear all buffers
  112.         DEVCMD  CMD_STOP        * hold current and queued
  113.         DEVCMD  CMD_START        * restart after stop
  114.         DEVCMD  CMD_FLUSH        * abort entire queue
  115.  
  116.  
  117. *------ First non-standard device command value:
  118.  
  119.         DEVCMD  CMD_NONSTD
  120.  
  121.     ENDC    ; EXEC_IO_I
  122.